package pta;

import java.util.Scanner;

/**
 * @author tmh
 * @date 2024/12/15 22:23
 * @description
 */
public class T6_4输入考试成绩异常 {
    public static void main(String args[]) {
        Score wang = new Score();
        int n;
        Scanner input = new Scanner(System.in);
        n = input.nextInt();
        input.close();
        try {
            wang.setFinalscore(n);
            System.out.println(wang.getFinalscore());
        } catch (IntegerException e) {
            System.out.println(e.toString());
        }

    }
}

class Score {
    private int finalscore;

    public void setFinalscore(int finalscore) throws IntegerException {
        if (finalscore > 100) {
            throw new IntegerException("too much");
        }
        if (finalscore < 0) {
            throw new IntegerException("illegal input");
        }
        this.finalscore = finalscore;
    }

    public int getFinalscore() {
        return finalscore;
    }
    /* 请在这里填写答案 */
}

class IntegerException extends Exception {
    public IntegerException(String message) {
        super(message);
    }

    @Override
    public String toString() {
        return getMessage();
    }

}